package com.project.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.project.bean.ExpertBean;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 专家持久层
 */
@Repository
public interface ExpertDao extends BaseMapper<ExpertBean> {
    /**
     * 分页查询所有专家信息
     * @return
     */
    List<ExpertBean> findAllExpert();


    /**
     * 添加专家
     * @param expertBean
     */
    void addExpert(ExpertBean expertBean);


    /**
     * 根据专家id查询详细信息
     * @param expertId
     * @return
     */
    ExpertBean findId(@Param("exId") int expertId);


    /**
     * 根据专家id去修改专家电话、职务、工作单位、邮箱
     * @param expertId
     * @param expertTel
     * @param expertDuty
     * @param expertWork
     * @param expertEmail
     */
    void updateExpert(int expertId,String expertTel,String expertDuty,String expertWork,String expertEmail);


    /**
     * 根据专家id删除专家
     * @param expertId
     */
    void delExpert(int expertId);


    /**
     * 根据专家姓名，专长，工作单位模糊查询专家信息
     * @param expertName
     * @param expertSpecialty
     * @param expertWork
     * @return
     */
    List<ExpertBean> findName(String expertName, String expertSpecialty, String expertWork);

}
